<?php
namespace app\index\controller;
use think\Controller;
use think\Db;
use think\Request;
use think\Session;
class Whitewall extends Common
{
    public function index()
    {
    	$data=Db::name("whitewall")->field("id,to,from,title")->paginate(60);
        $this->view->assign('data',$data);
        $this->view->assign('page',$data->render());
        return view();
    }
    public function read()
    {
    	$id=$this->request->param('id');
    	$data=Db::name("whitewall")->field("id,to,from,title")->where('id='.$id.'')->select();
    	$list=Db::name('comment')->where('activity_id='.$id.'')->select();
    	$this->view->assign('data',$data);
    	$this->view->assign('list',$list);
    	return view();
    }

}
